package com.kongmou.springDataJpaAdvanced.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * @author Mocker
 * @Date 2016-12-28 上午12:50
 * @Description 角色
 * @Version 1.0
 */
@Table(name = BaseEntity.TABLE_PREFIX + "ROLE")
@Entity
public class Role extends BaseEntity {


    //角色名称//
    @Column(name = "name", length = 50, nullable = false, unique = true)
    private String name;

    //行政区域代码
   // @Column(name = "region", nullable = true)
    @Transient
    private String region;

    //行政区域名称
    //@Column(name = "region_name", nullable = true)
    @Transient
    private String regionName;

    /**
     * 是否是隐藏角色 角色名则是用户的ID 当hide = 1 用户名等于角色名则可以确认该角色是这用户的隐藏角色
     */
    @Column(name = "hide", nullable = true)
    private boolean hide;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public boolean isHide() {
        return hide;
    }

    public void setHide(boolean hide) {
        this.hide = hide;
    }

    public String getRegion() {
        return region;
    }

    public void setRegion(String region) {
        this.region = region;
    }

    public String getRegionName() {
        return regionName;
    }

    public void setRegionName(String regionName) {
        this.regionName = regionName;
    }

}
